@mixin float-formItem($index, $itemIndex, $formClass, $formItemClass){
  @if $itemIndex > 0 {
    .#{$css-prefix}#{$formClass}-col-#{$index}.#{$css-prefix}#{$formItemClass}-col-#{$itemIndex}{   
      width: percentage(( $itemIndex / $index));            
    }
     // 日期组，内部定义h-col
    .h-col {
      .#{$css-prefix}#{$formClass}-col-#{$index}.#{$css-prefix}#{$formItemClass}-col-#{$itemIndex} {
        width: 100%;
      }
    }
    @include float-formItem($index, ($itemIndex - 1), $formClass, $formItemClass)
  } @else {
    .#{$css-prefix}#{$formClass}-col-#{$index} {
      width: percentage(( 1 / $index));  
    }
     // 日期组，内部定义h-col
    .h-col {
      .#{$css-prefix}#{$formClass}-col-#{$index} {
        width: 100%;
      }
    }
  }
}

@mixin float-formItem-columns($index, $itemIndex, $formClass, $formItemClass) {
  @if $index > 0 {
    @if $formItemClass != '' and $itemIndex > 0{
      // formItem设置cols
      @include float-formItem($index, $itemIndex, $formClass, $formItemClass);
    } @else {
      // formItem不设置cols
      .#{$css-prefix}#{$formClass}-col-#{$index} {
        width: percentage(( 1 / $index));  
      }
      // 日期组，内部定义h-col
      .h-col {
        .#{$css-prefix}#{$formClass}-col-#{$index} {
          width: 100%;
        }
      }
    }
    @include float-formItem-columns(($index - 1), $itemIndex, $formClass, $formItemClass);
  } @else if $index = 0{
    .#{$css-prefix}#{$formClass}-col-#{$index} {
        display: none;
    }
  } @else {
  }
}

@mixin make-form-grid ($formClass: '',$formItemClass: '') {
  @include float-formItem-columns($form-cols, $form-cols, $formClass, $formItemClass);
}